// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.asset;

import zombie.fileSystem.FileSystem;
import zombie.fileSystem.FileTask;
import zombie.fileSystem.IFileTaskCallback;
import zombie.util.PZXmlUtil;

public final class FileTask_ParseXML extends FileTask {
    Class<? extends Object> m_class;
    String m_filename;

    public FileTask_ParseXML(Class<? extends Object> klass, String filename, IFileTaskCallback cb, FileSystem fileSystem) {
        super(fileSystem, cb);
        this.m_class = klass;
        this.m_filename = filename;
    }

    @Override
    public String getErrorMessage() {
        return this.m_filename;
    }

    @Override
    public void done() {
        this.m_class = null;
        this.m_filename = null;
    }

    public Object call() throws Exception {
        return PZXmlUtil.parse(this.m_class, this.m_filename);
    }
}
